package com.xliee.modules.service.controller;

import com.xliee.modules.problem.entity.ProblemEntity;
import com.xliee.modules.service.entity.ServiceEntity;
import com.xliee.modules.service.service.IServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lisongsong@xliee.com
 * @since 2024-09-06 10:46:05
 */
@Controller
@RequestMapping("/service")
public class ServiceController {

    @Autowired
    IServiceService serviceService;

    @RequestMapping("/list")
    public String list(ServiceEntity service, Model model) {
        List<ServiceEntity> list =  serviceService.list();
        model.addAttribute("list",list);
        model.addAttribute("service",service);
        return "service/listPage";
    }


}
